package frsf.cidisi.exercise.arqueologo.search;

import Clases.Mundo;
import Clases.Cofre;
import frsf.cidisi.faia.state.EnvironmentState;

/**
 * This class represents the real world state.
 */
public class ArqueologoEnvironmentState extends EnvironmentState {
	
    private Mundo mundo;
    private String posicionArqueologo;
    private String inicio;
    private String destino;
    private int [][] distanciasMin;
	
    public ArqueologoEnvironmentState() {
        
    	posicionArqueologo = "Aragaey";
    	inicio = "Aragaey";
    	destino = "Bresol";
        mundo = new Mundo();
        this.distanciasMin = mundo.distanciasMinimas();
        this.initState();
    }
    /**
     * This method is used to setup the initial real world.
     */
    @Override
    public void initState() {

    }
    /**
     * String representation of the real world state.
     */
    @Override
    public String toString() {
        String str = "";

        return str;
    }
    // The following methods are agent-specific:
	
    public Mundo getmundo(){
        return mundo;
    }
    public String getposicionArqueologo(){
        return posicionArqueologo;
    }
    public void setposicionArqueologo(String arg){
        posicionArqueologo = arg;
    }
    public String getinicio(){
        return inicio;
    }
    public void setinicio(String arg){
        inicio = arg;
    }
    public String getdestino(){
        return destino;
    }
    public void setdestino(String arg){
        destino = arg;
    }
    public int getDistMin(){
    	int indiceA = this.mundo.getNombres().indexOf(posicionArqueologo);
    	int indiceD = this.mundo.getNombres().indexOf(destino);
    	return distanciasMin[indiceA][indiceD];
    }
    public Cofre getCofre(){
    	return mundo.getCofre(posicionArqueologo);
    }
}

